package com.woniu.register.service.impl;

import com.woniu.register.dto.PropDTO;
import com.woniu.register.dto.ProposerDTO;
import com.woniu.register.entity.Proposer;
import com.woniu.register.mapper.ProposerMapper;
import com.woniu.register.service.ProposerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author ：zhulongxing
 * @date ：Created in 2022/12/6 19:25
 * @description：
 * @modified By：
 * @version: $
 */
@Service
public class ProposerServiceImpl implements ProposerService {
    @Autowired
    ProposerMapper proposerMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(Proposer record) {
        return 0;
    }

    @Override
    public int insertSelective(Proposer record) {
        record.setIsDeleted(0);
        record.setCreateTime(new Date());
        proposerMapper.insertSelective(record);
        return record.getProposerId();
    }

    @Override
    public int insertProposer(ProposerDTO record) {
        return proposerMapper.insertProposer(record);
    }
    

    @Override
    public Proposer selectByPrimaryKey(Long id) {
        return proposerMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(PropDTO record) {
        return proposerMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Proposer record) {
        return proposerMapper.updateByPrimaryKey(record);
    }

    @Override
    public int selectId() {
        return proposerMapper.selectId();
    }


}
